home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power CD-ROM!! 8
/
Power CD-ROM 8.iso
/
windows
/
winbatch
/
doserror.ba_
< prev
next >
Wrap
Text File
|
1994-08-28
|
722b
|
45 lines
@ECHO OFF
ERASE ERROR*.LVL
%1 %2 %3 %4 %5 %6 %7 %8 %9
REM EXITCODE.BAT - converts exit code to an e-var
FOR %%v IN (0 1 2) DO IF ERRORLEVEL %%v00 SET EX=%%v
IF "%EX%"=="2" GOTO over200
FOR %%v IN (0 1 2 3 4 5 6 7 8 9) DO IF ERRORLEVEL %EX%%%v0 SET EX=%EX%%%v
GOTO digit3
:==== over200 ====
FOR %%v IN (0 1 2 3 4 5) DO IF ERRORLEVEL %EX%%%v0 SET EX=%EX%%%v
:==== digit2 =====
IF "%EX%"=="25" GOTO over250
GOTO digit3
:==== over250 ====
FOR %%v IN (0 1 2 3 4 5) DO IF ERRORLEVEL %EX%%%v SET EX=%EX%%%v
GOTO done
:==== digit3 =====
FOR %%v IN (0 1 2 3 4 5 6 7 8 9) DO IF ERRORLEVEL %EX%%%v SET EX=%EX%%%v
:==== done =======
ECHO %EX% > ERROR%EX%.LVL
SET EX=